System and method for hyperspectral image processing to identify object

ABSTRACT

A system includes a memory and at least one processor to acquire a hyperspectral image of an object by an imaging device, the hyperspectral image of the object comprising a three-dimensional set of images of the object, each image in the set of images representing the object in a wavelength range of the electromagnetic spectrum, normalize the hyperspectral image of the object, select a region of interest in the hyperspectral image, the region of interest comprising at least one image in the set of images, extract spectral features from the region of interest in the hyperspectral image, and compare the spectral features from the region of interest with a plurality of images in a training set to determine particular characteristics of the object.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is related to and claims priority under 35 U.S.C. §119(e) to U.S. Patent Application No. 62/521,950, filed Jun. 19, 2017,entitled “SYSTEM AND METHOD FOR CLASSIFYING QUALITY PARAMETERS OFAVOCADOS DURING SUPPLY CHAIN PROCESSES,” the entire contents of whichare incorporated herein by reference.

BACKGROUND

Food quality and safety, in addition to food traceability andauthenticity are issues of the highest economic and environmentalimportance for consumers, governments, and the food industry. Visualinspections, sample tests, and traditional microbiological and DNA-basedtests are no longer adequate monitoring tools to ensure security inincreasingly complex food supply chains. The development and applicationof rapid, non-destructive and accurate quality assurance systems basedon controlling, monitoring, and recording the critical parametersthroughout the food supply chain are crucial for both food quality andsafety applications.

For food producers and retailers, the quality control and qualityassurance process today involves time-consuming visual inspections,sample tests, and expensive and lengthy lab-based microbiologicalsampling, resulting in contaminants such as plastics, metals, fibers,and other contaminants being found in finished food products leading torecalls, loss of sales, and brand and reputational damage. The globalfood industry is in need of a rapid, non-invasive, and accurate systemfor detecting contaminants during processing to increase the securityand transparency of supply chains.

Conventional food quality and safety control is overwhelmingly analogand varies significantly between food companies. Food companies use amyriad of different outdated methodologies. Quality control and qualityassurance is highly dependent on visual inspections, destructive testsand sample-based testings, resulting in high levels of waste andincreasing levels of fraud and contamination.

It is with these issues in mind, among others, that various aspects ofthe disclosure were conceived.

SUMMARY

According to one aspect, a system for hyperspectral image processing isprovided for performing hyperspectral image processing on ahyperspectral image of an object comprising a set of images of theobject to compare a region of interest in the hyperspectral image with aplurality of images in a training set. As a result, the system maydetermine characteristics of the object by comparing the region ofinterest in the hyperspectral image with the plurality of images in thetraining set. The system may include memory and at least one processorto acquire a hyperspectral image of an object by an imaging device, thehyperspectral image of the object comprising a three-dimensional set ofimages of the object, each image in the set of images representing theobject in a wavelength range of the electromagnetic spectrum, normalizethe hyperspectral image of the object, select a region of interest inthe hyperspectral image, the region of interest comprising a subset ofat least one image in the set of images, extract spectral features fromthe region of interest in the hyperspectral image, compare the spectralfeatures from the region of interest with a plurality of images in atraining set to determine particular characteristics of the object, andidentify the object based on the spectral features.

According to another aspect, a method includes acquiring, by aprocessor, a hyperspectral image of an object by an imaging device, thehyperspectral image of the object comprising a three-dimensional set ofimages of the object, each image in the set of images representing theobject in a wavelength range of the electromagnetic spectrum,normalizing, by the processor, the hyperspectral image of the object,selecting, by the processor, a region of interest in the hyperspectralimage, the region of interest comprising a subset of at least one imagein the set of images, extracting, by the processor, spectral featuresfrom the region of interest in the hyperspectral image, comparing, bythe processor, the spectral features from the region of interest with aplurality of images in a training set to determine particularcharacteristics of the object, and identifying the object based on thespectral features.

According to an additional aspect, a non-transitory computer-readablestorage medium includes instructions stored thereon that, when executedby a computing device cause the computing device to perform operations,the operations including acquiring a hyperspectral image of an object byan imaging device, the hyperspectral image of the object comprising athree-dimensional set of images of the object, each image in the set ofimages representing the object in a wavelength range of theelectromagnetic spectrum, normalizing the hyperspectral image of theobject, selecting a region of interest in the hyperspectral image, theregion of interest comprising a subset of at least one image in the setof images, extracting spectral features from the region of interest inthe hyperspectral image, comparing the spectral features from the regionof interest with a plurality of images in a training set to determineparticular characteristics of the object, and identify the object basedon the spectral features.

These and other aspects, features, and benefits of the presentdisclosure will become apparent from the following detailed writtendescription of the preferred embodiments and aspects taken inconjunction with the following drawings, although variations andmodifications thereto may be effected without departing from the spiritand scope of the novel concepts of the disclosure.

BRIEF DESCRIPTION OF THE DRAWINGS

The accompanying drawings illustrate embodiments and/or aspects of thedisclosure and, together with the written description, serve to explainthe principles of the disclosure. Wherever possible, the same referencenumbers are used throughout the drawings to refer to the same or likeelements of an embodiment, and wherein:

FIG. 1 is a block diagram of a system for hyperspectral image processingaccording to an example embodiment.

FIG. 2 illustrates a block diagram of a computing device of the systemaccording to an example embodiment.

FIG. 3 illustrates a flowchart for performing machine learningclassification on an image according to an example embodiment.

FIG. 4 illustrates a graph of that represents three different pixelseach having a spectral profile according to an example embodiment.

FIG. 5 illustrates a flowchart for performing hyperspectral imageprocessing on an object according to an example embodiment.

FIG. 6 illustrates a block diagram of a computing device according to anexample embodiment.

DETAILED DESCRIPTION

Aspects of a system and method for hyperspectral image processingprovide a computing device executing an image processing application forhyperspectral image processing on a hyperspectral image of an objectcomprising a set of images of the object to compare a region of interestin the hyperspectral image with a plurality of images in a training set.This may be used to classify quality of the object with respect to oneor more factors or parameters and may be used to classify quality of aperishable item such as a type of food during food supply chainprocesses. In one example, the object may be a food object such as anavocado. As a result, the application may determine characteristics ofthe object by comparing the region of interest in the hyperspectralimage with the plurality of images in the training set. The computingdevice may be in communication with an imaging device that captures thehyperspectral image of the object. The object may be one object of aplurality of objects that are located on a conveyor belt that isilluminated by at least one illumination device and move past theimaging device.

The object may be a food object or agricultural product such as one ofthe avocado, a banana, an orange, a peach, an onion, a pear, a kiwifruit, a mango, berries, a tomato, an apple, sugar, pork, lamb, beef, orfish, among other objects. In addition, the imaging device may determinethat there is a contaminant or a foreign object in the image.

The system includes memory and at least one processor to acquire thehyperspectral image of the object by the imaging device, thehyperspectral image of the object comprising a three-dimensional set ofimages of the object, each image in the set of images representing theobject in a wavelength range of the electromagnetic spectrum, normalizethe hyperspectral image of the object, select a region of interest inthe hyperspectral image, the region of interest comprising a subset ofat least one image in the set of images, extract spectral features fromthe region of interest in the hyperspectral image, and compare thespectral features from the region of interest with a plurality of imagesin a training set to determine particular characteristics of the object.

In one aspect, the system is provided for using hyperspectral imaging todetermine Dry Matter content of an object such as an avocado or anotherperishable item. In another aspect, the system is provided for usinghyperspectral imaging to determine firmness of an object such as anavocado or another perishable item. In another aspect, the system isprovided for using hyperspectral imaging to determine ripeness of anobject such as an avocado or another perishable item.

In another aspect, the system is provided for using hyperspectralimaging to determine the presence of a contaminant such as an objectthat should not be located on the conveyor belt. This may be a foreignobject. The contaminant may be one of plastic, paper, a metal hook, acigarette butt, cardboard, textile, or another type of contaminant. Asan example, the plastic contaminant may be plastic parts such as a cabletie.

The system may include an imaging module for acquiring a hyperspectralimage of at least a portion of the object, a pre-processing module foranalyzing the hyperspectral image to generate data that can beprocessed, and an output module for providing output regarding theanalysis of the hyperspectral image. In one example, the hyperspectralimage may be a set of images that together form a hyperspectral datacube to be processed by the system. The set of images may include twohundred and twenty four images of the object that each represents arange of wavelengths in the hyperspectral image. Alternatively, the setof images may include a different number of images that each representsa range of wavelengths in the hyperspectral image.

The system may additionally include a synthetic data generation modulethat may be used to create a training set for determiningcharacteristics of the object and may generate a database of data orlibrary of data. The hyperspectral image captured by the imaging modulemay be compared with the database of data to analyze the hyperspectralimage.

As noted herein, conventional food quality and safety control isoverwhelmingly analog and varies significantly between food companies.Food companies use a myriad of different outdated methodologies. Qualitycontrol and quality assurance is highly dependent on visual inspections,and destructive tests and samples, resulting in high levels of waste andincreasing levels of fraud and contamination.

Further, for food producers and retailers, the quality control andquality assurance process today involves time-consuming visualinspections, sample tests, and expensive and lengthy lab-basedmicrobiological sampling, resulting in contaminants such as plastics,metals, fibers, and other contaminants being found in finished foodproducts leading to recalls, loss of sales, and brand and reputationaldamage. The global food industry is in need of a rapid-non-invasive andaccurate system for detecting contaminants during processing to increasethe security and transparency of supply chains.

The problems associated with the destructive and conventional tests ofan object such as a perishable food item may be solved by a computingdevice that performs hyperspectral image analysis of the object todetermine characteristics of the object without destroying the object.Thus, the solutions discussed herein provide efficiencies and financialbenefits for the food industry. The computing device may execute ahyperspectral image processing application that provides solutions thathuman visual inspections cannot provide. The computing device is able toquickly and efficiently analyze a plurality of perishable food items bycomparing hyperspectral images of the perishable food items to a libraryor database of images and using machine learning to improve theanalysis.

The library or database of images may be based on actual objects and/ormay be rendered by the computing device. The rendered images may bebased on actual objects that may be augmented with data inserted in theimages by the computing device or modified by the computing device. Asan example, the data inserted into the images may be color data.Alternatively, the object may be modified in a way such as to modify anorientation and/or a position of the object in the image. Each image inthe library or database of images may have associated information suchas characteristics of the object.

FIG. 1 shows a block diagram of a system for hyperspectral imageprocessing 100 for identifying an object and for classifying qualityparameters of an object according to an example embodiment. The systemfor hyperspectral image processing 100 may include a moving tray or aconveyor belt device 102 having one or more objects 104 that travelalong the moving tray or a conveyor belt of the conveyor belt device102. The one or more objects may have a foreign object 103 orcontaminant on them. In addition, the system for hyperspectral imageprocessing 100 may include an illumination system that may include atleast one illumination device 106.

Additionally, the system for hyperspectral image processing 100 mayinclude at least one imaging device 108. In one example, the imagingdevice 108 may be a chemical machine vision camera such as ahyperspectral camera that may include one or more optical sensorsconfigured to detect electromagnetic energy that is incident on thesensor. Any number of various optical sensors may be used to obtainimages in various spectral regions for use in analyzing properties ofthe one or more objects 104. As an example, the imaging device 104 maybe configured to collect images in the 400-1000 nanometer (nm)wavelength region, which corresponds to visible and near-infrared light.

Thus, the imaging device 108 may collect information incident on thesensor as a set of images 105, whereby each image in the set of imagesrepresents a wavelength range of the electromagnetic spectrum. Eachimage of the set of images 105 may represent a spectral band. As shownin FIG. 1, the set of images 105 may be combined together to form athree-dimensional data cube for processing and analysis by the computingdevice 110. The x and y dimensions of each image in the set of imagesmay represent two spatial dimensions of the object 104 on the conveyorbelt device 102 and the wavelength dimension in the cube may representthe spectral dimension that comprises a range of wavelengths in theimage.

The object 104 may sit on the moving tray or the conveyor belt device102 and the moving tray or the conveyor belt device 102 may include alinear slide to move each object 104 past the imaging device 108. Theimaging device 108 may be a line scanner camera such that the imagingdevice 108 may acquire an image by moving the object in a steady,straight, and continuous motion under the sensor at a constant speed. Asan example, if the object 104 is a piece of frozen fish, then moving thefrozen fish on a conveyor belt underneath the imaging device 108 mayallow the imaging device to scan the entire frozen fish.

Alternatively, the imaging device 108 may be a push broom scanner or asnapshot imager. In one example, the moving tray or the conveyor beltdevice 102 may include a motor such as a stepper motor.

Additionally, the system for hyperspectral image processing 100 mayinclude a computing device 110 for performing hyperspectral imageprocessing on the hyperspectral image 105 captured by the at least oneimaging device 108. Additionally, the computing device 110 may be usedto synchronize the operation of the imaging device 108 with theoperation of the moving tray or the conveyor belt device 102.

The illumination device 106 may be a concentrated light source that maydirect electromagnetic energy at the one or more objects 104. Theconcentrated light source may be configured to direct a particularwavelength of light at an object, after which the at least one imagingdevice 108 may detect reflected light from the at least one illuminationdevice 106. The at least one illumination device may be a light sourcesuch as a halogen light or another light source. In addition, the atleast one light source 106 may direct light toward the object 104 toprovide uniform illumination of the object. In one example, there may betwo light sources 106 that direct light at a forty-five degree angle tothe object 104 being imaged. The two light sources 106 may face oneanother. Other arrangements of the light sources 106 are possible.

The computing device 110 may include an image processing application 112that processes and analyzes each hyperspectral image 105 captured by theimaging device 108. The computing device 110 may include and/or be incommunication with a database 114 that may store data and imagesassociated with the system for hyperspectral image processing 100. Inone example, the database 114 may store information such as a trainingset of data that may comprise a plurality of images of the object 104.The plurality of images may be generated synthetically by the computingdevice 110 and/or obtained from another source. In addition, theplurality of images may be captured by the imaging device 108 andincluded as part of the training set of data. Additionally, the databasemay store characteristics of the object in each of the plurality ofimages. These characteristics may include a label or name for the objectand other information such as measurements of the object. Themeasurements may be assigned manually by users of the computing device110 and/or determined automatically by the computing device 110 duringanalysis of the hyperspectral image 105. As an example, the measurementsmay be ground truth measurements of the object 104. Additionally, theimage processing application 112 may communicate with other computingdevices via a communication network 116.

The at least one computing device 110 is configured to receive data fromand/or transmit data to other computing devices through thecommunication network 116. As an example, the imaging device 108 maytransmit each hyperspectral image 105 to the computing device 110 foranalysis. Although the at least one computing device 110 is shown as asingle computing device, it is contemplated that the at least onecomputing device may include multiple computing devices, for example, ina cloud computing configuration. Additionally, the at least onecomputing device 110 is configured to receive data and/or transmit datathrough the communication network 116.

The communication network 116 can be the Internet, an intranet, oranother wired or wireless communication network. For example, thecommunication network 106 may include a Mobile Communications (GSM)network, a code division multiple access (CDMA) network, 3^(rd)Generation Partnership Project (GPP), an Internet Protocol (IP) network,a wireless application protocol (WAP) network, a WiFi network, or anIEEE 802.11 standards network, as well as various communicationsthereof. Other conventional and/or later developed wired and wirelessnetworks may also be used.

The at least one computing device 110 includes at least one processor111 to process data and memory 113 to store data. The processor 111processes communications, builds communications, retrieves data frommemory 113, and stores data to memory 113. The processor 111 and thememory 113 are hardware. The memory 113 may include volatile and/ornon-volatile memory, e.g., a computer-readable storage medium such as acache, random access memory (RAM), read only memory (ROM), flash memory,or other memory to store data and/or computer-readable executableinstructions such as a portion or component of the image processingapplication 112. In addition, the at least one computing device 110further includes at least one communications interface to transmit andreceive communications, messages, and/or signals.

The at least one computing device 110 may display on a display agraphical user interface (or GUI) to generate a graphical user interfaceon the display. The graphical user interface may be provided by theimage processing application 112. The graphical user interface enables auser of the at least one computing device 110 to interact with the atleast one computing device 110 and the image processing application 112.

The GUI may be a component of an application and/or service executableby the at least one computing device 110. For example, the imageprocessing application 112 may be a single unit of deployable executablecode or a plurality of units of deployable executable code. According toone aspect, the image processing application 112 may be a webapplication, a native application, and/or a mobile application (e.g., anapp) downloaded from a digital distribution application platform thatallows users to browse and download applications developed with softwaredevelopment kits (SDKs) including the App Store and GOOGLE PLAY®, amongothers. The image processing application 112 or at least a portionthereof may be resident and executed by the at least one computingdevice 110, which may have the WINDOWS® operating system, a Linux-basedoperating system, the OS X® operating system, the iOS operating system,or an ANDROID™ operating system, among other operating systems.

FIG. 2 illustrates a block diagram of the computing device 110 accordingto an example embodiment. The computing device 110 may be a computerhaving a processor 202, such as a laptop, desktop, tablet computer,mobile computing device (e.g., a smartphone), a wearable device, or adedicated electronic device having a processor and memory. The one ormore processors 202 process machine/computer-readable executableinstructions and data, and the memory stores machine/computer-readableexecutable instructions and data including one or more applications,including the image processing application 112. The processor 202 andmemory are hardware. The memory includes random access memory (RAM) andnon-transitory memory, e.g., a non-transitory computer-readable storagemedium such as one or more flash storages or hard drives. Thenon-transitory memory may include any tangible computer-readable mediumincluding, for example, magnetic and/or optical disks, flash drives, andthe like. Additionally, the memory may also include a dedicated fileserver having one or more dedicated processors, random access memory(RAM), a Redundant Array of Inexpensive/Independent Disks (RAID) harddrive configuration, and an Ethernet interface or other communicationinterface, among other components.

The computing device 110 includes computer readable media (CRM) 204 inmemory on which the image processing application 112 or other userinterface or application is stored. The computer readable media mayinclude volatile media, nonvolatile media, removable media,non-removable media, and/or another available medium that can beaccessed by the processor 202. By way of example and not limitation, thecomputer readable media comprises computer storage media andcommunication media. Computer storage media includes non-transitorystorage memory, volatile media, nonvolatile media, removable media,and/or non-removable media implemented in a method or technology forstorage of information, such as computer/machine-readable/executableinstructions, data structures, program modules, or other data.Communication media may embody computer/machine-readable/executableinstructions, data structures, program modules, or other data andinclude an information delivery media or system, both of which arehardware.

As shown in FIG. 2, the image processing application 112 may include apre-processing module 206 that may receive an image from the imagingdevice 108 and perform pre-processing on the image. First, thepre-processing module 206 may perform pre-processing on the image usingone or more sub-modules. The sub-modules may include a normalizationmodule that may perform normalization on the image, object recognitionusing an object recognition module, feature extraction using a featureextraction module, and reduction of data using a reduction of datamodule.

The normalization of the image may be performed to compare images thatmay have a different level of illumination. The normalization of thecaptured spectral data may include black level subtraction combined withwhite level normalization. When using a linear push broom sensor array,the normalization may be performed per-sampling elements to account forspatially variant, static noise. Other sensor types may usenormalization specific to their design. Normalization may also includeremoving the illuminant spectrum based on an estimate of the illuminantfrom a separate sensing apparatus. The feature extraction module mayextract bags of features including but not limited to spatial featuresincluding maximally stable extremal regions, Haralick textural features,FAST (Features from Accelerated Segment Test) corner features, andspectral features including dimensionality reduced spectra, selectedspectral ranges, and interpolated spectral values. The featureextraction module may combine spatial and spectral features to determinespecific quality parameter classification. The object recognition modulemay utilize machine learning, including but not limited to neuralnetworks to detect and classify objects in the image.

The reduction of data module may reduce dimensionality of data in theimage. This may be performed by performing principal component (PC)analysis or another type of analysis. In other words, the pre-processingmodule 206 may reduce redundancies in the image and may eliminate someof the images in the set of images captured by the imaging device 108that is unnecessary for performing the image processing. Certainwavelength ranges may be more useful for the image processing andanalysis than others. As an example, if the set of images includes twohundred and twenty four different images that each represent a differentwavelength range of the object, then the pre-preprocessing module 206may select ten of the two hundred and twenty four different images asthe images that best represent the object in the set of images. In otherwords, the pre-processing module 206 may select a subset of the set ofimages that best represent the object and/or spectral features of theobject in the set of images.

Additionally, the image processing application 112 may include asynthetic dataset generation module 208 that may generate a plurality oftraining data for deriving a mathematical model that may representcontent in the data. Neural network models have a tendency to overfitdata. In other words, neural network models may be sensitive to trainingdata and behavior of the model may not generalize to new/unseen data.One way to avoid overfitting is to collect a large amount of data. Atypical neural network may have up to one million parameters, and tuningthese parameters may require millions of training instances ofuncorrelated data, which may not always be possible and in some casesmay be cost prohibitive to software development. These issues may beaddressed through the use of the synthetic dataset generation module 208by classifying different materials associated with objects and foreignobjects in thousands of shapes and formations. One such way to avoidoverfitting other than collecting a large amount of data may be toutilize data augmentation. Augmentation refers to the process ofgenerating new training data from a smaller data set such that the newdata set represents the real world data that one may see used inpractice.

The synthetic dataset generation module 208 may be provided with groundtruth measurements on each object so that the output module 210 maycorrelate a specific image captured by the imaging device 108 with aspecific ground truth measurement value. A ground truth measurement maybe a chemical or physical test of a characteristic such as pH ortenderness of an object. Thus, the computing device 110 is able to usemachine learning on images from the synthetic dataset generation module208 and images obtained by the imaging device 108 to continue to improveand compare images.

Data mirroring and cropping may be used as specific techniques for dataaugmentation in computer vision and image processing. Image data may berepresented in a variety of different orientations. In other words,copies of a same image may be generated from different perspectives orvisual angles.

As an example, training data associated with the synthetic datasetgeneration module 208 may be built by obtaining and/or simulating imagesof an object or agricultural product such as an avocado, a banana, anorange, a peach, an onion, a pear, a kiwi fruit, a mango, berries, atomato, an apple, sugar, pork, lamb, beef, or fish, among other objects.The training data may be stored in the database 114 and/or memory of thecomputing device 110, among other locations.

Different colors of a banana may indicate different firmness levels. Abanana may be represented as a color coded landscape, e.g., where greenfields may indicate a firm banana. Different colors of an avocado mayindicate different firmness levels.

In addition, the image processing application 112 may be able todetermine bruises or defects associated with an orange. The imageprocessing application 112 may be able to determine a cold injury on apeach or sour skin disease in an onion.

Additionally, the image processing application 112 may be able todetermine bruises or defects associated with a kiwi fruit or a pear.Further, the image processing application 112 may be able to determineissues associated with other types of citrus fruits such as a citruscanker.

In addition, the image processing application 112 may be able todetermine freshness of a fish by providing analysis of a fish eye. Theimage processing application 112 may be able to determine tenderness ofpork, lamb, beef, or another type of meat product.

As an example, the synthetic dataset generation module 208 may generatea synthetic dataset for beef tenderness. The intramuscular fat of beefmay have a strong implication on tenderness of a beef steak. Theintramuscular fat may be viewed as rivers or a delta in a landscape withdifferent altitudes. The synthetic dataset may include renderedlandscapes (images) with rivers and deltas having steaks with differenttenderness classes. A rendered image may appear as a hyperspectral imagethat has been created by the computing device 110 or another computingdevice. Using the synthetic beef images, the computing device 110 mayextract spectral features from images of beef steak. The syntheticspectral features may be fed into a classifier of the synthetic datasetgeneration module 208 to further improve and develop the training data,thereby resulting in better prediction accuracy.

As an example, acquiring three hundred cuts of beef and performingground truth measurements on the cuts of beef may take approximately onemonth for a beef producer. This may be a full time job for one person.If each cut of beef costs $10.00 and the cost to pay the producer may be$4,700, then this would cost $7,700. This is only the cost for one typeof beef cut and the system would have to be applicable to a plurality ofdifferent beef cuts from multiple different muscles. Thus, in order toprovide a model suitable for the system, the system would have toutilize different images from different beef producers.

To create a best model for beef tenderness, in theory, it would bedesirable to have 10,000 beef images. Thus, this would cost $78,000 onlyto collect and obtain data. However, the synthetic dataset generationmodule 208 may generate training data from a smaller set of data tosolve financial and efficiency issues. This may save on database storageand may provide computing efficiency savings. It may be estimated thatthe synthetic dataset generation module 208 may significantly reducecosts to nearly zero once samples for initial training have been tested.

As another example, the synthetic dataset generation module 208 mayobtain pixels from an image set that may be correlated with differentquality parameters of an object 104 such as a fruit. Certain brown andyellow pixels may be used to determine particular ripeness levels of thebanana. The synthetic dataset generation module 208 may be able tomanipulate and replicate the brown and yellow pixels in a plurality ofdifferent positions to simulate and create images indicating differentstages of ripeness for bananas. As an example, the synthetic datasetgeneration module 208 may use a hyperspectral image of a very ripebanana having a plurality of brown pixels. In addition, the syntheticdataset generation module 208 may have another hyperspectral image of anunripe banana having yellow and green pixels. The synthetic datasetgeneration module 208 may generate a new image based on these images ofthe very ripe banana and the unripe banana that is somewhat between thetwo images.

The synthetic dataset generation module 208 may receive an imagecaptured by the imaging device 108 or from another source and may addinformation and data to the image by augmenting the image. As anexample, the synthetic dataset generation module 208 may manipulate theimage by adding color to pixels to an image. An avocado may have pixelsof a certain color. By adding additional very green color to pixels tothe image, the synthetic dataset generation module 208 may change aripeness level of the avocado. Each image captured by the imaging devicemay have a plurality of channels and thus each pixel may have aplurality of associated data points.

As another example, the synthetic dataset generation module 208 maydigitally add and/or modify an object in the image by inserting spectralinformation into the image. The synthetic dataset generation module 208may automatically manipulate the object to render the object in adifferent position and/or orientation.

Even further, the synthetic dataset generation module 208 may insert aforeign object into the image by inserting the foreign object on theobject 104. The foreign material or object may be injected into theimage at a known location. Then, sampling the spectra from theregions/pixels affected by the object may provide a frequency table thatindicates the foreign material. The synthetic dataset generation module208 may increase a size of data matrices by seeding known data(“infected”) points. This may allow the synthetic dataset generationmodule 208 to generate a lot of data points with a small differentiationfrom real values collected. The matrices may then be used to createareas of simulated hidden foreign bodies and the neural network may betrained.

As an example, different colors of plastic or paper objects may berendered on or into the object to make it appear that the object has oneor more foreign objects or materials. The synthetic dataset generationmodule 208 may manipulate the one or more foreign objects and maymanipulate the foreign object in a plurality of different positionsand/or orientations. Thus, the synthetic dataset generation module 208may automatically generate and modify images by augmenting images.

In one example, the synthetic dataset generation module 208 may generatea three dimensional model of one or more objects to be detected. Realworld objects may be used as reference. Animations of the objects may berendered with variations in size, orientation, visibility, occlusion,deformation, and background (noise). The synthetic dataset generationmodule 208 may utilize pre-trained networks to obtain higher precisionand reduce an amount of compute resources used. The shape of thedistribution of sampled pixels may be “roughly” determined by generatingnew pixels by “filling in” more pixel data that does not disturb ageneral shape of an associated frequency table. This may allow thesynthetic dataset generation module 208 to properly parameterizelearning/network models based on real data and include augmented data.The robustness of the networks may be manually tuned by a user bymodifying a range of normalized stochastic variables that may be used inseeding generated matrices in conjunction with tuning parameters of thenetworks.

Further, the image processing application 112 may include an outputmodule 210. The output module 210 may perform machine learningclassification of an object and predict and assign quality parameters toobjects. The output module 210 may receive the hyperspectral image 105from the pre-processing module 206 that has been pre-processed andreceive the synthetic dataset from the synthetic dataset generationmodule 208. The output module 210 may compare a region of interest inthe hyperspectral image 105 with the training set of data that maycomprise the plurality of images of the object 104 that may include thesynthetic dataset. The output module 210 may include one or moresub-modules that may include a machine learning classification modulethat may utilize generative adversarial neural networks and/or deeplearning neural networks to classify bags of features. The machinelearning classification module may also utilize a partial least squaresregression to classify bags of features. In addition, otherclassification models may be used to classify bags of features.

The output module 210 may add an object label and may determine thatpixels in the hyperspectral image have spectral information indicatingquality information. The output module 210 may perform objectrecognition on a selected region of interest in the image. A region ofinterest may be a specific area of an image that may include informationof value for determining a quality of an object. As an example, theregion of interest may be selected by obtaining a hyperspectral image105 of an object from the imaging device 108. The object may be anavocado or another object. The region of interest may be determinedautomatically using gray scaling or edge detection. As an example, withgray scaling, the entire image may be converted into pixels which have agray color value between zero and one. The output module 210 may set athreshold value to enable the computing device 110 to differentiatebetween the object and the conveyor belt.

Once the region of interest is identified, the output module 210 mayextract all spectral information from pixels in the region of interest.Spectral information may be extracted from each pixel in the region ofinterest and the spectral information for determining each pixel in theregion of interest and may be stored as a table associated with theimage. Once all of the pixels have been classified, the output module210 may compare each pixel with neighbors to determine if the pixelshave neighboring pixels with a same classification. If a pixel has morethan one neighbor, the pixel may be classified as a foreign object.Alternatively, if a pixel has at least three neighbors or at least Nneighbors, the pixel may be classified as a foreign object. In addition,the output module 210 may determine a spatial value for the pixel bycounting the number of pixels that are neighbors. This may be used todetermine a dimensionality. In other words, if a pixel is known torepresent one inch by one inch on the conveyor belt, then by determininga number of pixels are classified and are neighbors, the output module210 may measure a dimensionality of the object.

The pixels may be used to train the output module 210 and/or torecognize quality attributes of the object. All spectral data providedto the machine learning classification module may be reduced to match aminimum viable set of features thereby allowing imaging systems that maynot share exact specifications. As an example, the minimum viable set offeatures may be features that may be determined by differenthyperspectral imaging systems. One hyperspectral system may extractspectral values between 400 nanometers and 600 nanometers. A secondhyperspectral system may extract spectral values between 400 nanometersand 1000 nanometers. The minimum viable set of features between thefirst hyperspectral system and the second hyperspectral system may be400 nanometers to 600 nanometers. That may allow the computing device110 to detect patterns between spectral values and a ripeness quality ofan object such as an avocado. The output module 210 may further performextraction of spectral data from the object.

In addition, before classifying the image as representing a specificobject having certain qualities, the output module 210 may reduce datain the image by compressing data associated with the image. This mayinclude generating a mean value of the spectral values in the region ofinterest. The mean may be a mean for the entire region of interest or aspectral mean for each pixel.

The machine learning classification may have four layers including oneinput layer, two hidden layers, and one output layer. In one aspect, themachine learning classification may utilize a neural network that mayhave three autoencoder layers, whereby the first layer may act as theinput layer and the remaining layers may be hidden layers. Theautoencoder layers may together form a stacked autoencoder (SAE). Theautoencoder layers may further include a logistic regression layer andan output layer that may return class probabilities.

A user of the system 100 may initially train the machine learningclassification module by assigning a label (e.g., avocado) and qualityparameter information (e.g., firmness, dry matter content, amount ofsugar) to one or more sets of images. The quality parameter informationmay be based on ground truth measurements of the object captured in theone or more sets of images. The machine learning classification modulemay use this initial training data to develop a mathematical model thatallows the machine learning classification module to assign a particularlabel and quality parameter information to an input image by comparingthe input image to each image in the training data. The machine learningclassification module may then add the input image to the training dataand learn from this input image to continue to perform more preciseassignment of the label and quality parameter information.

In one example, the machine learning classification module may utilizelibraries associated with a machine learning framework such asTENSORFLOW™ or another machine learning framework. In another example,the machine learning classification module may utilize one or moresupport vector machines (SVMs) to classify the object 104 in the image.

FIG. 3 illustrates an example process 300 of performing machine learningclassification on the hyperspectral image 105 according to an exampleembodiment. As shown in FIG. 3, the output module 210 may determine thatthere are n pixels in the image. For each pixel of the n pixels in theimage, the output module 210 may determine that there are v spectralvalues. Each of the v spectral values for the pixel may be fed into aclassifier provided by the output module 210. The classifier maydetermine that the v spectral values are associated with k classes. Foreach class of the k classes, the output module 210 may determine a dotproduct for each of the pixel's spectral values and the class. A classhaving a highest value is determined to be a predicted class for theimage 105.

The output module 210 may identify and determine the label for eachobject and assign quality parameters to the object based on analysis ofthe image set. The output module 210 may determine characteristics ofthe object 104 by comparing the region of interest in the hyperspectralimage 105 with the plurality of images in the training set. The analysisof the image may be based on the comparison of the image set with thedata provided by the machine learning classification module. As anexample, the output module 210 may determine approximate measurementsfor the object. If the object is a fruit such as an avocado then themeasurements may include a firmness, a dry matter content, and a sugarcontent. Other measurements are possible based on the object 104 to beanalyzed.

Firmness may be measured using the Anderson Firmometer measure. Atypical firmness value of an avocado immediately post-harvest may be tento fifteen, wherein the scale ranges from zero to one-hundred and ten.Firmness may indicate a ripeness level.

Dry matter content may be an indicator for ripeness of an object such asan avocado. Dry matter may be measured as a percentage of the avocado,wherein a typical value may be twenty-one percent.

The amount of sugar in an object such as avocado may be estimated usinga high-performance liquid chromatography-test (HPLC), which is ananalytical chemical tool. The amount of sugar may indicate a ripeness ofthe fruit. A higher concentration of sugar in the fruit may indicatethat it is riper. A sugar content may be measured as an amount of sugarper one hundred grams. A typical value of sugar content in an avocadomay be 0.9 grams of sugar per one hundred grams of avocado.

FIG. 4 illustrates a graph 400 having three different lines thatrepresent three different pixels having different spectral profiles.Each of the lines is associated with a different pixel of thehyperspectral image. As an example, each of the lines may indicate apixel associated with an image of a banana. The lines may represent abrown pixel, a green pixel, and a yellow pixel, among other types ofpixels. As is shown in FIG. 4, the graph shows a level of reflectanceand an associated wavelength.

FIG. 5 illustrates a flowchart of a process 500 for performinghyperspectral image processing on an object 104 according to an exampleembodiment. In step 502, the at least one computing device 110 acquiresa hyperspectral image 105 of an object 104 from the imaging device 108.The hyperspectral image 105 of the object 104 may be a three-dimensionalset of images of the object, each image in the set of imagesrepresenting the object in a wavelength range of the electromagneticspectrum. Next, in step 504, the image processing application 112 of theat least one computing device 110 normalizes the hyperspectral image ofthe object 104. In addition, the image processing application 112 of theat least one computing device 110 may compress the hyperspectral image105 of the object 104.

In step 506, the image processing application 112 of the at least onecomputing device 110 selects a region of interest in the hyperspectralimage 105. As an example, the region of interest may be selected in atleast two of three dimensions of the image. In one example, the regionof interest in the hyperspectral image 105 may include a representationof the object 104 in at least one wavelength range. In step 508, theimage processing application 112 of the at least one computing device110 may extract spectral features from the region of interest in thehyperspectral image of the object 104.

In step 510, the image processing application 112 of the at least onecomputing device 110 analyzes the spectral features of the region ofinterest and classifies the spectral features by comparing thehyperspectral image 105 with images and data in the synthetic datasetand using machine learning. This may include comparing the spectralfeatures from the region of interest with the plurality of images in thetraining set to determine particular characteristics of the object. Thismay allow the image processing application 112 to classify and/or labelthe object in the image 105 (e.g., avocado) and in addition, this mayinclude determining a value for at least one quality parameter for theobject. As a result, the image processing application 112 may assignvalues to associated quality parameters of the object 104 such as drymatter, firmness, and ripeness, among others.

As an example, the image processing application 112 may determine the atleast one quality parameter that may include dry matter content of theobject 104, firmness of the object 104, and ripeness of the object 104based on the classification of the spectral features. Each of thequality parameters may have at least one level of classification. Drymatter content may include a first level of classification when the drymatter content is under 21%, a second level of classification when thedry matter content is 21%, and a third level of classification when thedry matter content is above 21%. The image processing application 112may assign a value between zero and one for each level of classificationfor each pixel in the region of interest.

Alternatively, this may include comparing the spectral features from theregion of interest with the plurality of images in the training set todetermine the presence of contaminants. This may be a contaminant suchas plastic, paper, a metal hook, a cigarette butt, cardboard, textile,or another type of contaminant. Thus, this may include classifyingspectral features found as foreign objects on the object.

In step 512, the image processing application 112 of the at least onecomputing device 110 may identify the object 104 and/or the foreignobject 103 based on the classified spectral features and the comparisonof the hyperspectral image 105 with the images and data in the syntheticdataset. This may be similar to comparing a hyperspectral fingerprint ofthe hyperspectral image 105 with the images and data in the syntheticdataset. This may include classifying and identifying the object as afood object. The food object or agricultural product may be one of anavocado, a banana, an orange, a peach, an onion, a pear, a kiwi fruit, amango, berries, a tomato, an apple, sugar, pork, lamb, beef, or fish. Inaddition, this may include classifying and identifying plastic on frozenfish, classifying plastic on fruit such as an avocado, and classifyingfibers or plastics in sugar.

FIG. 6 illustrates an example computing system 600 that may implementvarious systems, such as the computing device 110, and the methodsdiscussed herein, such as process 300 and process 500. A general purposecomputer system 600 is capable of executing a computer program productto execute a computer process. Data and program files may be input tothe computer system 600, which reads the files and executes the programstherein such as the image processing application 112. Some of theelements of a general purpose computer system 600 are shown in FIG. 6wherein a processor 602 is shown having an input/output (I/O) section604, a central processing unit (CPU) 606, and a memory section 608.There may be one or more processors 602, such that the processor 602 ofthe computer system 600 comprises a single central-processing unit 606,or a plurality of processing units, commonly referred to as a parallelprocessing environment. The computer system 600 may be a conventionalcomputer, a server, a distributed computer, or any other type ofcomputer, such as one or more external computers made available via acloud computing architecture. The presently described technology isoptionally implemented in software devices loaded in memory 608, storedon a configured DVD/CD-ROM 610 or storage unit 612, and/or communicatedvia a wired or wireless network link 614, thereby transforming thecomputer system 600 in FIG. 6 to a special purpose machine forimplementing the described operations.

The memory section 608 may be volatile media, nonvolatile media,removable media, non-removable media, and/or other media or mediums thatcan be accessed by a general purpose or special purpose computingdevice. For example, the memory section 608 may include non-transitorycomputer storage media and communication media. Non-transitory computerstorage media further may include volatile, nonvolatile, removable,and/or non-removable media implemented in a method or technology for thestorage (and retrieval) of information, such ascomputer/machine-readable/executable instructions, data and datastructures, engines, program modules, and/or other data. Communicationmedia may, for example, embody computer/machine-readable/executable,data structures, program modules, algorithms, and/or other data. Thecommunication media may also include an information delivery technology.The communication media may include wired and/or wireless connectionsand technologies and be used to transmit and/or receive wired and/orwireless communications.

The I/O section 604 is connected to one or more user-interface devices(e.g., a keyboard 616 and a display unit 618), a disc storage unit 612,and a disc drive unit 620. Generally, the disc drive unit 620 is aDVD/CD-ROM drive unit capable of reading the DVD/CD-ROM medium 610,which typically contains programs and data 622. Computer programproducts containing mechanisms to effectuate the systems and methods inaccordance with the presently described technology may reside in thememory section 604, on a disc storage unit 612, on the DVD/CD-ROM medium610 of the computer system 600, or on external storage devices madeavailable via a cloud computing architecture with such computer programproducts, including one or more database management products, web serverproducts, application server products, and/or other additional softwarecomponents. Alternatively, a disc drive unit 620 may be replaced orsupplemented by a tape drive unit, or other storage medium drive unit.The network adapter 624 is capable of connecting the computer system 600to a network via the network link 614, through which the computer systemcan receive instructions and data. Examples of such systems includepersonal computers, Intel or PowerPC-based computing systems, AMD-basedcomputing systems, ARM-based computing systems, and other systemsrunning a Windows-based, a UNIX-based, or other operating system. Itshould be understood that computing systems may also embody devices suchas Personal Digital Assistants (PDAs), mobile phones, tablets or slates,multimedia consoles, gaming consoles, set top boxes, etc.

When used in a LAN-networking environment, the computer system 600 isconnected (by wired connection and/or wirelessly) to a local networkthrough the network interface or adapter 624, which is one type ofcommunications device. When used in a WAN-networking environment, thecomputer system 600 typically includes a modem, a network adapter, orany other type of communications device for establishing communicationsover the wide area network. In a networked environment, program modulesdepicted relative to the computer system 600 or portions thereof, may bestored in a remote memory storage device. It is appreciated that thenetwork connections shown are examples of communications devices for andother means of establishing a communications link between the computersmay be used.

In an example implementation, source code executed by the computingdevice 110, a plurality of internal and external databases, sourcedatabases, and/or cached data on servers are stored in the memory of thecomputing device 110, or other storage systems, such as the disk storageunit 612 or the DVD/CD-ROM medium 610, and/or other external storagedevices made available and accessible via a network architecture. Thesource code executed by the computing device 110 may be embodied byinstructions stored on such storage systems and executed by theprocessor 602.

Some or all of the operations described herein may be performed by theprocessor 602, which is hardware. Further, local computing systems,remote data sources and/or services, and other associated logicrepresent firmware, hardware, and/or software configured to controloperations of the hyperspectral image processing system 100 and/or othercomponents. Such services may be implemented using a general purposecomputer and specialized software (such as a server executing servicesoftware), a special purpose computing system and specialized software(such as a mobile device or network appliance executing servicesoftware), or other computing configurations. In addition, one or morefunctionalities disclosed herein may be generated by the processor 602and a user may interact with a Graphical User Interface (GUI) using oneor more user-interface devices (e.g., the keyboard 616, the display unit618, and the user devices 604) with some of the data in use directlycoming from online sources and data stores. The system set forth in FIG.6 is but one possible example of a computer system that may employ or beconfigured in accordance with aspects of the present disclosure.

In the present disclosure, the methods disclosed may be implemented assets of instructions or software readable by a device. Further, it isunderstood that the specific order or hierarchy of steps in the methodsdisclosed are instances of example approaches. Based upon designpreferences, it is understood that the specific order or hierarchy ofsteps in the method can be rearranged while remaining within thedisclosed subject matter. The accompanying method claims presentelements of the various steps in a sample order, and are not necessarilymeant to be limited to the specific order or hierarchy presented.

The described disclosure may be provided as a computer program product,or software, that may include a non-transitory machine-readable mediumhaving stored thereon executable instructions, which may be used toprogram a computer system (or other electronic devices) to perform aprocess according to the present disclosure. A non-transitorymachine-readable medium includes any mechanism for storing informationin a form (e.g., software, processing application) readable by a machine(e.g., a computer). The non-transitory machine-readable medium mayinclude, but is not limited to, magnetic storage medium (e.g., floppydiskette), optical storage medium (e.g., CD-ROM); magneto-opticalstorage medium, read only memory (ROM); random access memory (RAM);erasable programmable memory (e.g., EPROM and EEPROM); flash memory; orother types of medium suitable for storing electronic executableinstructions.

The description above includes example systems, methods, techniques,instruction sequences, and/or computer program products that embodytechniques of the present disclosure.

However, it is understood that the described disclosure may be practicedwithout these specific details.

It is believed that the present disclosure and many of its attendantadvantages will be understood by the foregoing description, and it willbe apparent that various changes may be made in the form, constructionand arrangement of the components without departing from the disclosedsubject matter or without sacrificing all of its material advantages.The form described is merely explanatory, and it is the intention of thefollowing claims to encompass and include such changes.

While the present disclosure has been described with reference tovarious embodiments, it will be understood that these embodiments areillustrative and that the scope of the disclosure is not limited tothem. Many variations, modifications, additions, and improvements arepossible. More generally, embodiments in accordance with the presentdisclosure have been described in the context of particularimplementations. Functionality may be separated or combined in blocksdifferently in various embodiments of the disclosure or described withdifferent terminology. These and other variations, modifications,additions, and improvements may fall within the scope of the disclosureas defined in the claims that follow.

What is claimed is:
 1. A system comprising: a memory; and at least oneprocessor to: acquire a hyperspectral image of an object by an imagingdevice, the hyperspectral image of the object comprising athree-dimensional set of images of the object, each image in the set ofimages representing the object in a wavelength range of theelectromagnetic spectrum; normalize the hyperspectral image of theobject; select a region of interest in the hyperspectral image, theregion of interest comprising a subset of at least one image in the setof images; extract spectral features from the region of interest in thehyperspectral image; compare the spectral features from the region ofinterest with a plurality of images in a training set to determineparticular characteristics of the object and determine a value for atleast one quality parameter for the object; and identify the objectbased on the spectral features.
 2. The system of claim 1, the at leastone processor further to train an object model using data comprising theplurality of images in the training set and ground truth measurementsassociated with the object and determine the particular characteristicsof the object based on the object model.
 3. The system of claim 1, theat least one processor further to determine dry matter content of theobject, firmness of the object, and sugar content of the object.
 4. Thesystem of claim 1, wherein the imaging device comprises a hyperspectralimaging device and the system further comprises at least oneillumination device that illuminates the object and a conveyor belt thatmoves the object past the imaging device as the hyperspectral imagingdevice captures the hyperspectral image.
 5. The system of claim 1,wherein the object comprises a perishable food item.
 6. The system ofclaim 5, wherein the perishable food item comprises an avocado.
 7. Thesystem of claim 1, wherein the object comprises an avocado and the atleast one processor further to determine at least one of dry mattercontent of the avocado, firmness of the avocado, and sugar content ofthe avocado, based on the spectral features from the region of interest.8. A method comprising: acquiring, by a processor, a hyperspectral imageof an object by an imaging device, the hyperspectral image of the objectcomprising a three-dimensional set of images of the object, each imagein the set of images representing the object in a wavelength range ofthe electromagnetic spectrum; normalizing, by the processor, thehyperspectral image of the object; selecting, by the processor, a regionof interest in the hyperspectral image, the region of interestcomprising a subset of at least one image in the set of images;extracting, by the processor, spectral features from the region ofinterest in the hyperspectral image; comparing, by the processor, thespectral features from the region of interest with a plurality of imagesin a training set to determine particular characteristics of the objectand determining a value for at least one quality parameter for theobject; and identifying, by the processor, the object based on thespectral features.
 9. The method of claim 8, further comprising trainingan object model using data comprising the plurality of images in thetraining set and ground truth measurements associated with the objectand determining the particular characteristics of the object based onthe object model.
 10. The method of claim 8, further comprisingdetermining dry matter content of the object, firmness of the object,and sugar content of the object.
 11. The method of claim 8, the imagingdevice comprising a hyperspectral imaging device and the method furthercomprising illuminating the object by at least one illumination deviceand moving the object past the imaging device by a conveyor belt as thehyperspectral imaging device captures the hyperspectral image.
 12. Themethod of claim 8, wherein the object comprises a perishable food item.13. The method of claim 12, wherein the perishable food item comprisesan avocado.
 14. The method of claim 8, wherein the object comprises anavocado and the method further comprising determining at least one ofdry matter content of the avocado, firmness of the avocado, and sugarcontent of the avocado, based on the spectral features from the regionof interest.
 15. A non-transitory computer-readable storage medium,having instructions stored thereon that, when executed by a computingdevice cause the computing device to perform operations, the operationscomprising: acquiring a hyperspectral image of an object by an imagingdevice, the hyperspectral image of the object comprising athree-dimensional set of images of the object, each image in the set ofimages representing the object in a wavelength range of theelectromagnetic spectrum; normalizing the hyperspectral image of theobject; selecting a region of interest in the hyperspectral image, theregion of interest comprising a subset of at least one image in the setof images; extracting spectral features from the region of interest inthe hyperspectral image; comparing the spectral features from the regionof interest with a plurality of images in a training set to determineparticular characteristics of the object and determining a value for atleast one quality parameter for the object; and identifying the objectbased on the spectral features.
 16. The non-transitory computer-readablestorage medium of claim 15, the operations further comprising trainingan object model using data comprising the plurality of images in thetraining set and ground truth measurements associated with the objectand determining the particular characteristics of the object based onthe object model.
 17. The non-transitory computer-readable storagemedium of claim 15, the operations further comprising determining drymatter content of the object, firmness of the object, and sugar contentof the object.
 18. The non-transitory computer-readable storage mediumof claim 15, the imaging device comprising a hyperspectral imagingdevice and the operations further comprising illuminating the object byat least one illumination device and moving the object past the imagingdevice by a conveyor belt as the hyperspectral imaging device capturesthe hyperspectral image.
 19. The non-transitory computer-readablestorage medium of claim 15, wherein the object comprises a perishablefood item.
 20. The non-transitory computer-readable storage medium ofclaim 19, wherein the perishable food item comprises an avocado.